package test;

public class A1 {
	static int x = 2;

	// int x = 2;
	public void setX(int i) {
		x = i;
	}

	void printa() {
		System.out.println(x);
	}

	public static void main(String[] args) {
		A1 a = new A1();
		a.setX(4);
		a.printa();

		B1 b = new B1();
		b.printb();
		b.printa();

		b.setX(6);
		b.printb();
		b.printa();
		a.printa();
	}
}

class B1 extends A1 {
	int x = 100;

	void printb() {
		super.x = super.x + 10;
		System.out.println("super.x=" + super.x + " x=" + x);
	}
}
